package com.ruoyi.app.domain.bo;

import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.*;

import java.util.Date;

import com.ruoyi.common.core.domain.BaseEntity;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

/**
 * APP商品评论业务对象 app_goods_comment
 *
 * @author heike
 * @date 2023-04-24
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class AppGoodsCommentBo extends BaseEntity {

    /**
     * ID
     */
    private Long id;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 商品ID
     */
    @NotNull(message = "商品ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long goodsId;

    /**
     * 订单ID
     */
    @NotNull(message = "订单ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long orderId;


    /**
     * 点赞
     */
    @Range(min = 1, max = 5, message = "好评等级1到5星", groups = {AddGroup.class, EditGroup.class})
    private Integer star;

    /**
     * 评论内容
     */
    @NotBlank(message = "评论内容不能为空", groups = {AddGroup.class, EditGroup.class})
    private String descript;

    /**
     * 图片信息
     */
    private String images;

    /**
     * 备注
     */
    private String remark;

}
